﻿using System.Windows;

namespace MyFloridaHouse.SilverlightOpenDistricts
{

    public partial class MainPage
    {
        // this is a VIEW trigger that listens for an event in the VIEW-MODEL

        public void onRightMenuChange()
        {
            ApplicationMapSpace.ColumnDefinitions[4].Width = new GridLength(viewModelBase.rightMenuColumnWidth);
        }

        public void onLeftMenuChange()
        {
            ApplicationMapSpace.ColumnDefinitions[0].Width = new GridLength(viewModelBase.leftMenuColumnWidth);
        }

        public void onSaveRightMenuColumnWidth()
        {
            viewModelBase.rightMenuColumnWidth = ApplicationMapSpace.ColumnDefinitions[4].Width.Value;
        }

        public void onSaveLeftMenuColumnWidth()
        {
            viewModelBase.leftMenuColumnWidth = ApplicationMapSpace.ColumnDefinitions[0].Width.Value;
        }
        // End VIEW trigger
    }
}
